home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 June
/
1984-06.d64
/
word scramble_vi
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
70 lines
10 print"[147]":poke36879,8:print"word scramble":poke36878,15
20 gosub1000:poke36879,27:print"[147]"
25 print"each player taking":print"turns enters a common"
30 print"word (max.10 letters).";
35 print"the computer will then";:print"scramble the word and"
40 print"print it."
45 print"you have three minutes";:print"to find it."
50 print"if found within the":print"allotted time,you will";
55 print"be given 50 points.":print"every wrong guess that";
60 print"you make will cost":print"you 10 points."
65 print:print:print:print"[156]press space bar[146]"
70 geta$:ifa$=""then70:c=0
80 print"[147]player # 1's name":inputp$(0)
85 print:print:print"player # 2's name":inputp$(1)
90 print:print"[156]"p$(c)",":print"enter word to be":print"scrambled:[146]"
92 w$="":inputw$:ifw$=""thenprint"[145]";:goto92
95 iflen(w$)>10thenprint"more then 10 letters![146][145][145][145][145][145][145][145]"::goto90
100 gosub200
110 gosub300
120 t(c)=t(c)+s(c)
130 gosub400:fori=1to10:b$(i)="":next
140 goto90
200 fori=1tolen(w$)
210 a$(i)=mid$(w$,i,1)
220 next
230 c$="":fori=1tolen(w$)
240 r=int(rnd(1)*len(w$)+1)
250 ifb$(r)<>""then240
260 b$(r)=a$(i)
270 next
271 fori=1tolen(w$):c$=c$+b$(i):next
272 ifc$=w$andlen(w$)<>1thenfori=1tolen(w$):b$(i)="":next:goto230
275 print"[147]word hasbeen scrambled[146]"
280 print"press space barwhen ready"
285 getc$:ifc$=""then285
290 print"[147]";
295 fori=1tolen(w$):print"";b$(i);:next
298 return
300 x=51:s(c)=50
310 ti$="000000"
320 print:print:print:print
325 sc=7885:cc=38605
330 fori=1tolen(w$)
335 pokesc,99:pokecc,2
340 getc$
350 print""mid$(ti$,4,1)" [146]minutes "right$(ti$,2)" [146]seconds"
355 ifti$="000300"thengosub500:goto390
360 ifc$=""then340
365 print""
370 ifc$=a$(i)thenprinttab(x)a$(i);:poke36875,200:fort=1to100:next:poke36875,0:goto380
375 ifs(c)<10thengosub550:goto390
378 ifc$<>a$(i)thens(c)=s(c)-10:poke36877,220:fort=1to100:next:poke36877,0:goto335
380 x=x+1:sc=sc+1:cc=cc+1:next
390 return
400 ifc<>1thenc=1:return
410 print"[147]scores[146]"
420 print"[163][163][163][163][163][163]"
430 print""p$(0),p$(1)
440 printt(1),t(0)
450 c=0:return
500 print"[147]your time is up.[146]"
510 print"word was:"w$".":s(c)=0
520 fort=1to5000:next:return
550 print"you ran out of points.[146]"
560 print"[156]word was:"w$"."
570 fort=1to2000:next
580 return
1000 fors=250to235step-1:poke36874,s:poke36878,s-235:fort=1to100:nextt,s
1010 poke36874,0:poke36878,15:return